Find methods

Each Data Object has methods for searching by their property values. For each property is a method "FindBy<property name>" generated.

So if you want to find all employees with a special postal code you can use:


IList<Employee> list = Employee.FindByPostalcode("1234*");


If the property has the data type string, you can also use '*' as a wildcard.



To get a sorted result set, you can pass a sort clause to the Find methods:


EmployeeSortClause sortClause = new EmployeeSortClause();

sortClause.AddLastname();

sortClause.AddFirstname();


IList<Employee> list = Employee.FindByPostalcode("1234*", sortClause);


This will return the Employee objects in a (Lastname,Firstname) order.